// The Vue build version to load with the `import` command
// (runtime-only or standalone) has been set in webpack.base.conf with an alias.
import Vue from 'vue'
import App from './App'
import router from './router'
import VueRouter from 'vue-router'
import FastClick from 'fastclick'
import { AjaxPlugin } from 'vux'
import { Radio, Group, Cell, Badge, Drawer, Actionsheet, ButtonTab, ButtonTabItem, ViewBox, XHeader, Tabbar, TabbarItem, Loading, TransferDom,XButton,ToastPlugin, Calendar,DatetimeRange,XInput,Toast,Popup,TabItem,Tab,PopupPicker,Picker} from 'vux'
let arr = {Radio, Group, Cell, Badge, Drawer, Actionsheet, ButtonTab, ButtonTabItem, ViewBox, XHeader, Tabbar, TabbarItem, Loading,XButton,ToastPlugin,Calendar,DatetimeRange,XInput,Toast,Popup,TabItem,Tab,PopupPicker,Picker};
Vue.directive('transfer-dom', TransferDom);
for(let x in arr){
    Vue.component(x, arr[x])
}
Vue.use(ToastPlugin)
Vue.use(AjaxPlugin);
Vue.use(VueRouter);
Vue.config.productionTip = false
FastClick.attach(document.body);

/* eslint-disable no-new */
const app = new Vue({
    el: '#app',
    router,
    components: {App},
    render: h => h(App)
});
export default app;
